package com.iflytek.jcy.supervise.clue.component.config;

import org.springframework.boot.web.servlet.ServletListenerRegistrationBean;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurerAdapter;

import com.iflytek.sec.uap.client.rest.listener.UserSessionListener;

/**
 * 
 * <br>
 * 标题:用户在线时长统计功能集成  <br>
 * 描述: 应用的Session存储在内存中 另外一種集成到redis请参考集成文档2.9章节<br>
 * 公司: www.iflytek.com<br>
 * @autho dgyu
 * @time 2022年12月4日 上午11:38:33
 */
@SuppressWarnings("deprecation")
@Configuration
public class SessionConfiguration extends WebMvcConfigurerAdapter {
    @Bean
    public ServletListenerRegistrationBean<UserSessionListener> servletListenerRegistrationBean() {
        ServletListenerRegistrationBean<UserSessionListener> registrationBean = new ServletListenerRegistrationBean<UserSessionListener>();
        registrationBean.setListener(new UserSessionListener());
        return registrationBean;
    }
}

